#pragma once

#include <windows.h>
#include <gl\gl.h>
#include <gl\glu.h>

#include <cg\cg.h>

#include "..\common\headers\IRenderable.h"
#include "..\Sgm\Mesh.h"

#include "GlExtFactory.h"
#include "Material.h"
#include "IAnimatable.h"

class Mesh : public IRenderable, public IAnimatable
{
private:
	UINT vboId;
	Material *material;
	CGparameter matrixParam;

public:
	sgm::Mesh *mesh;
	Mesh(sgm::Mesh *mesh, CGparameter matrixParam);

	void SetMaterial(Material *material);

	void Process(float ms);
	void Render();

	void SetPosition(sm::Vec3 pos);
	void SetRotation(float angle, sm::Vec3 axis);
	void SetScale(sm::Vec3 scale);
	void SetRoll(float angle);
	int GetId();
};
